<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<script>
		     var arr=['x','y','z'];
			 var arr1 = arr.join("|"); 
			alert(arr1);
		</script>
	</body>
</html>